<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="app"></div>
</body>
<script>
  // 1.生成XHR对象
  var xhr = new XMLHttpRequest()
  // 2.绑定回调函数 
  xhr.onreadystatechange = function () {
    // 3. 判断是否成功 
    if (xhr.readyState === 4 && xhr.status === 200) {
      const list = JSON.parse(xhr.responseText).data
      console.log(list)
    }
  }
  // 4. 打开请求
  xhr.open('GET', 'https://api.i-lynn.cn/college')
  // 5.发送请求
  xhr.send()
</script>
</html>